package
{
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.utils.Dictionary;
import flash.display.Graphics;
import flash.events.KeyboardEvent;

public class Tool extends Object
{
	protected var canvas:TheCanvas;
	public static var hash:Dictionary;
	public var keyCode:int;
	
	public function Tool()
	{
		super();
		hash=new Dictionary(true);
	}
	
	public function keyUp():void{
		
	}
	
	public function keyDownHandler(evt:KeyboardEvent):void{
		
	}
	
	public function responsible(c:TheCanvas):void{
		canvas=c;
		canvas.responsible=this;
	}
	
	public function finish():void{
		canvas.responsible=null;
	}
	
	public function down():void{
		trace("down");
	}
	
	public function move():void{
		
	}
	
	public function up():void{
		
	}
	
	public function renderMouseMC(mouse_mc:Sprite):void{
		canvas.removeChildren(mouse_mc);
	}
	
	public function drawPoints(points:Collection,point_pen:Graphics):void{
		point_pen.clear();
	}
	
	public function getHandler(p:Object):Sprite{
		var s:Sprite=new Sprite();
		var g:Graphics=s.graphics;
		g.lineStyle(0,0x000000,0);
		g.beginFill(0x000000,1);
		g.moveTo(0,0);
		g.drawRect(-3,-3,6,6);
		g.endFill();
		
		s.x=p.x;
		s.y=p.y;
		hash[s]=p;
		
		return s;
	}
	
}

}

